<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="myDiv">myDiv</div>

<script>
    /*    let element = document.getElementById("myDiv");
        let obj = {};
        obj[element] = "aaa"
        console.log(obj)*/

    let element = document.getElementById("myDiv");
    let map = new Map();
    map.set(element, "aaa");
    console.log(map)
    console.log(new Map().get("aaa"));

//     Map的键是和内存地址绑定的。

    const map2 = new Map([
        ['F', 'no'],
        ['T',  'yes'],
    ]);

    for (let [key,val] of map2) {
        console.log(key,val)
    }

</script>

</body>
</html>
